package com.tobeface.sns.domain;


/**
 * 
 * @author loudyn
 * 
 */
public interface UserRepository {

	/**
	 * 
	 * @param username
	 * @return
	 */
	User queryUniqueByUsername(String username);
	
	/**
	 * 
	 * @param email
	 * @return
	 */
	User queryUniqueByEmail(String email);
	
	/**
	 * 
	 * @param user
	 * @return
	 */
	User save(User user);

	/**
	 * 
	 * @param username
	 * @param email
	 * @return
	 */
	boolean existsByUsernameAndEmail(String username, String email);

	/**
	 * 
	 * @param username
	 * @param email
	 * @return
	 */
	boolean existsByUsernameOrEmail(String username);

	/**
	 * 
	 * @param username
	 * @param newPassword
	 */
	void updatePassword(String username, String newPassword);
	
	/**
	 * 
	 * @param username
	 * @param newEmail
	 */
	void updateEmail(String username,String newEmail);

}
